import { Router } from '@angular/router';
import { Component, Inject, OnInit } from '@angular/core';
import { PublicConfig } from "../../../core/service/config/config";
import { TabService } from "../../../core/service/tab/tab.service";

@Component({
    templateUrl:'./root.component.html'
})
export class RootComponent implements OnInit{
    constructor(@Inject('pconfig') private pconfig:PublicConfig, private stepstabService:TabService, private router:Router){
        console.log(pconfig.getApiStatus('register'));
    }

    ngOnInit(){
        this.stepstabService.stepstab.subscribe((idx:number)=>{
           switch(idx){
               case 0:this.router.navigate(['/register', 'olderreg']);break;
               case 1:this.router.navigate(['/register', 'olderreg']);break;
               case 2:this.router.navigate(['/register', 'olderreg']);break;
           }
        })
    }
}